<?php
namespace addons\wwh\model;

use think\Model;
use fast\Tree;

class Column extends Model
{
    // 表名
    protected $name = 'wwh_column';


    public static function getNav(){
        $list = self::where(['isnav'=>'1', 'status'=>'normal'])->order('weigh desc')->select();
        $tree = Tree::instance()->init(collection($list)->toArray(), 'parent_id')->getTreeArray(0);
        return $tree;
    }

}
